package com.threeonemeeting.listcache;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.threeonemeeting.R;

public class UserInfoCache {

	private View baseView;

	private String strName;
	private String strEmail;

	private TextView nameView;
	private TextView emailView;
	private ImageView selectedImageView;

	public UserInfoCache(View baseView, String strName, String strEmail) {
		this.baseView = baseView;

		this.strName = strName;
		this.strEmail = strEmail;
	}

	public String getName() {
		return this.strName;
	}

	public String getEmail() {
		return this.strEmail;
	}

	public TextView getNameView() {
		if (nameView == null) {
			nameView = (TextView) baseView.findViewById(R.id.account_name);
		}
		return nameView;
	}

	public TextView getEmailView() {
		if (emailView == null) {
			emailView = (TextView) baseView.findViewById(R.id.account_email);
		}
		return emailView;
	}

	public ImageView getSelectedImageView() {
		if (selectedImageView == null) {
			selectedImageView = (ImageView) baseView
					.findViewById(R.id.img_is_selected);
		}
		return selectedImageView;
	}
}
